<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:70:"E:\WWW\huzhanwang.cc\public/../application/admin\view\config\form.html";i:1700548117;s:60:"E:\WWW\huzhanwang.cc\application\admin\view\common\meta.html";i:1670904727;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/admin/layuiadmin/style/admin.css" media="all">
  <script src="/static/echarts/echarts.js"></script>
  <script src="/static/admin/js/jquery-1.8.3.min.js"></script>
  <script src="/static/mods/notify_stand.js"></script>
</head>
<script>
  function clickimg(obj,img_tis){
    var img=$('#'+img_tis).val();
    console.log(img)
    var imgs=img.split(',');
    var arr=new Array();
    for(var i=0;i<imgs.length;i++){
      if(imgs[i]){
        if(i!=$(obj).index()){
        arr.push(imgs[i]);
      }
      }
    }
    $(obj).parent().remove();
    console.log(arr);
    $('#'+img_tis).val(arr.join(','));
    notify.success("操作成功", 'topRight');
}
function previewImg(obj) {
    var img = new Image(); 
    img.src = obj.src;
    //var height = img.height + 50; // 原图片大小
    //var width = img.width; //原图片大小
    var imgHtml = "<img src='" + obj.src + "' width='500px' height='500px'/>"; 
    //弹出层
    layer.open({ 
      type: 1, 
      shade: 0.8,
      offset: 'auto',
      area: [501 + 'px',551+'px'], // area: [width + 'px',height+'px'] //原图显示
      shadeClose:true,
      scrollbar: false,
      title: "图片预览", //不显示标题 
      content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响 
      cancel: function () { 
        //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 }); 
      } 
    }); 
  }
</script>
<style>
  .previewImg{
    width: 100px;
    cursor:pointer;
  }
  .layui-btn_text{
    color: #009688;
    cursor:pointer;
  }
  .layui-btn_text-danger{
    color: #FF5722;
  }
  .layui-btn_text-danger:hover {
    color: #ff3c00;
}
.imgs_posi{
    position: relative;
    width: 200px;
    float: left;
  }

  .imgs_posi img{
    width: 100%;
  }
  .img_ab{
    position: absolute;
    right: 10px;
    top:5px;
    background-color: aliceblue;
    color: #333;
    font-size: 16px;
    height: 20px;
    line-height: 20px;
    width: 20px;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
  }
  .layui-elem-quote{
    overflow: hidden;
  }
</style>
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
<script src="/static/component/layui/layui.js"></script>
<script src="/static/component/pear/pear.js"></script>
<body class="pear-container">
<div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
        <div class="layui-card">
            <form class="layui-form edit-form" method="post" action="">
            <div class="layui-tab layui-tab-brief" lay-filter="TabBrief">
                <ul class="layui-tab-title">
                    <!-- <li>系统参数</li> -->
                    <li class="layui-this">网站信息</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item  layui-show">
                        <div class="layui-form-item">
                                <label class="layui-form-label">
                                    网站名称
                                </label>
                                <div class="layui-input-block">
                                    <input autocomplete="off" class="layui-input" name="webname" value="<?php echo isset($data['webname'])?$data['webname']:''; ?>" type="text"/>
                                </div>
                            </div>
                            <!--     <div class="layui-form-item"  style="margin-bottom: 0px;">
                                  <label class="layui-form-label">Logo</label>
                                  <div class="layui-input-block">
                                    <div class="layui-input-inline"  style="width: 450px;">
                                    <input type="text" name="logo" id="logo" readonly value="<?php echo !empty($data)?$data['logo'] : ''; ?>" placeholder="请上传Logo" autocomplete="off" class="layui-input" >
                                  </div>
                                  <div class="layui-input-inline"  style="width: 200px;">
                                  <button style="float: left;" type="button" class="layui-btn" id="up_logo">上传二维码</button>
                                  </div>
                                  </div> 
                            </div>
                            <div class="layui-form-item">
                                  <label class="layui-form-label"></label>
                                  <div class="layui-input-inline"> 
                                    <img style="width:80px;"  class="layui-upload-img" id="logo_img" src="<?php echo !empty($data['logo'])?$data['logo']:''; ?>">
                                    <p id="demoText"></p>
                                  </div>
                            </div>  -->
                            <div class="layui-form-item"  style="margin-bottom: 0px;">
                                  <label class="layui-form-label">商家图片</label>
                                  <div class="layui-input-block">
                                    <div class="layui-input-inline"  style="width: 450px;">
                                    <input type="text" name="busi_img" id="busi_img" readonly value="<?php echo !empty($data)?$data['busi_img'] : ''; ?>" placeholder="请上传商家图片" autocomplete="off" class="layui-input" >
                                  </div>
                                  <div class="layui-input-inline"  style="width: 200px;">
                                  <button style="float: left;" type="button" class="layui-btn" id="up_busi_img">上传图片</button>
                                  </div>
                                  </div> 
                            </div>
                            <div class="layui-form-item">
                                  <label class="layui-form-label"></label>
                                  <div class="layui-input-inline"> 
                                    <img style="width:80px;"  class="layui-upload-img" id="busi_img_img" src="<?php echo !empty($data['busi_img'])?$data['busi_img']:''; ?>">
                                    <p id="demoText"></p>
                                  </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    小程序名称
                                </label>
                                <div class="layui-input-block">
                                    <input autocomplete="off" class="layui-input" name="wxname" value="<?php echo isset($data['wxname'])?$data['wxname']:''; ?>" type="text"/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    appid
                                </label>
                                <div class="layui-input-block">
                                    <input autocomplete="off" class="layui-input" name="appid" value="<?php echo isset($data['appid'])?$data['appid']:''; ?>" type="text"/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    appsecret
                                </label>
                                <div class="layui-input-block">
                                    <input autocomplete="off" class="layui-input" name="appsecret" value="<?php echo isset($data['appsecret'])?$data['appsecret']:''; ?>" type="text"/>
                                </div>
                            </div>
                    </div>
                </div>  
                <div class="layui-input-block" style="min-height: 80px;">
                    <button type="submit" class="pear-btn pear-btn-primary">保存</button>
                    <button type="reset" class="pear-btn">重置</button>
                </div>
        </form>    
        </div>
    </div>
</div>
<script>
    layui.use(['form', 'jquery', 'uploads'], function() {
        let form = layui.form;
        let upload = layui.upload;
        let $ = layui.jquery;
        upload.render({
            elem: '#up_logo'
            ,url: "<?php echo url('/admin/config/upload'); ?>"
            ,auto: true //选择文件后自动上传
            // ,bindAction: '#LAY-user-front-submit'
            ,field:'image'
            ,accept: 'images'   //指定允许上传时校验的文件类型
            ,method: 'post'
            ,acceptMime: 'image/*'
            ,multiple: false 
            ,done: function(res){  //执行上传请求后的回调。返回三个参数
              console.log(res);
              $("#logo").val(res.data)
              $("#logo_img").attr('src',res.data)
              layer.msg('上传成功', {
                        offset: '15px'
                        ,icon: 1
                        ,time: 1000
                      });
            },error:function(res){

            }
        });
        upload.render({
            elem: '#up_busi_img'
            ,url: "<?php echo url('/admin/config/upload'); ?>"
            ,auto: true //选择文件后自动上传
            // ,bindAction: '#LAY-user-front-submit'
            ,field:'image'
            ,accept: 'images'   //指定允许上传时校验的文件类型
            ,method: 'post'
            ,acceptMime: 'image/*'
            ,multiple: false 
            ,done: function(res){  //执行上传请求后的回调。返回三个参数
              console.log(res);
              $("#busi_img").val(res.data)
              $("#busi_img_img").attr('src',res.data)
              layer.msg('上传成功', {
                        offset: '15px'
                        ,icon: 1
                        ,time: 1000
                      });
            },error:function(res){

            }
        });
        
        // form.on('radio(type)', function(data){
        //     if(data.value==1){
        //         $("#oss").hide();
        //         $("#qiniu").hide();
        //     }
        //     if(data.value==2){
        //         $("#oss").show();
        //         $("#qiniu").hide();
        //     }
        //     if(data.value==3){
        //         $("#qiniu").show();
        //         $("#oss").hide();
        //     }
        // });  
    })
    </script>
<script type="text/javascript" charset="utf-8" src="/static/admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/admin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/admin/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">

    var ue = UE.getEditor('about',{ zIndex: 10});
</script>
</body>
</html>
